from datetime import datetime

from sc_engine.apps import messages as msgs 

SCRIPT_NAME = 'YoutubeScheduleFetch'

def run(bus):
    start = datetime(2008,10,4)
    end = datetime.today()

    messages = [
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'January'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'February'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'March'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'April'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'May'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'June'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'July'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'August'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'September'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'October'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'November'),
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'December'),
        #Yeah, he spelled "April" wrong on a few videos.
        msgs.YouTubeAuthorQueryFetchRequested('Jon747', 'Apil'),

        msgs.YouTubeAuthorFetchRequested('SC2GGRise', start, end),
        msgs.YouTubeAuthorFetchRequested('KlazartSC', start, end),
        msgs.YouTubeAuthorFetchRequested('diggitySC', start, end),
        msgs.YouTubeAuthorFetchRequested('moletrap', start, end),
        msgs.YouTubeAuthorFetchRequested('VioleTAK', start, end),

    ]

    for msg in messages:
        bus.send(msg)

